AS components are predefined components that can be used when creating web sites. They make it easy to create and modify web sites, add new functionality, reuse functionality or simply hide advanced code behind a user-friendly interface. The AS components can be inserted with drag-and-drop technology, and they are configured by setting parameters in a user-friendly form. This means that advanced web sites can be created with no (or very little) programming. System integrators and developers can develop their own components, or modify the existing components, to fulfill their needs. About 150 AS components are included in the Content Studio installation.

When the AS technology was invented for Content Studio, it was called Active Scripting. Since then, another (larger) actor have used the same terminology for something completely different, and now it is referred to as AS technology.

The AS components in version 5 are backward compatible with version 4. However, some AS components include parameters with scripts or inserted code which may need to be adjusted for the new platform languages if converting to version 5. Some of the AS components in version 4 were marked as deprecated, and they are no longer available in version 5. For all of these there are other components available with equivalent (or better) functionality.

AS component structure

The supplied AS components are stored in the System unit, and are grouped in categories depending on their intended usage. They consist of a user interface which makes it easy to manage the settings in Content Studio, and en underlying engine that executes the actions of the component. The engine is immediately accessible via the SiteLib API to allow easy and precise access to the functionality.

Frequently used AS components

Some AS components are used more often than others. The AS components described her probably covers 90% of the cases on a normal web site.

There are more detailed descriptions of the functionality of each component in the API reference. All available AS components are described in the chapter List of AS components .

Insert Document

This component inserts the content of another document on a page or in a template. The inserted document should not contain metadata if inserted into a document using metadata. An optional presentation template can be applied to the inserted document. It is possible to connect the document to the PreInit event, thus enabling management of server controls in the parent document.
This is probably the most frequently used component of Content Studio.

List Pageable Filtered Documents 2.0

This component lists documents from a category, filtered on several XML fields. The appearance of the generated table can be customized, the search results can be paged and the columns can be resorted. The filtering criteria use a syntax which is similar to SQL to determine which elements to select.

Insert Field 2.0

This component inserts an EPT field with optional labels in a presentation template.

Insert Field with Objects

This component inserts an EPT field with LiveObjects in a presentation template. The call to the object may include additional parameters and user authentication. The XML query data can be cached to improve the execution performance.

EPT Button

This component inserts a button in an editing or presentation template form. Javascript code can be executed when the button is activated.

Document Writer 4.0

This component is normally used to configure edit templates. It is intended to be used together with the EPT Button component and should be placed at the top of the edit template. The component only works when using modern web browsers such as Internet Explorer 6.

Anonymous Writer

This component allows anonymous users to store (post) data in Content Studio. The synchronized event OnBeforeDocumentSave is supported. The component is intended to be used together with forms and submit buttons. Server side validation must med activated for the EPT category. To edit existing documents, server execution and view state must be enabled for every field in the edit template. It is possible to select which categori to store the data in. It can only be included in EPT documents.

Insert menu 3.0

This component inserts a menu based on an XML source or a document hierarchy. The data can be cached to improve the execution performance. There are many settings to control the menu layout and functionality, such as CSS definitions, XSL transformation, hovering, clickable roots and partial menu structures.

Tree menu

This component inserts a tree menu based on a document hierarchy or an XML data source. An optional XSL style sheet can be applied to modify the appearance. The menu can be cached using session or application variables. The tree menu only works when using modern web browsers such as Internet Explorer 6.

Webitor 2.0

This component inserts an WYSIWYG editor for HTML code. The selection of formatting options can be controlled in detail to only allow editors to create content within the regulations. Typically, it is wise to limit the available set of fonts, styles, classes and object that can be inserted to ensure good accessibility. There is a validation functionality to ensure that the regulations of the document type are followed. The set of buttons can be customized to include any Content Studio operation. The webitor only works when using modern web browsers such as Internet Explorer 6, and will otherwise only show a text area input field.

Webitor Toolbar

This component inserts the toolbar of the webitor interface. The set of buttons can be customized to include any Content Studio operation.

Insert Script

This component inserts script code anywhere on the web page. It is traditionally used to define variables and to execute some external functions. With version 5 there are other, and more sophisticated methods, to achieve the same result.

Search result for categories

This component searches the full-text index and creates a table with the matching elements. The results can be filtered on units and categories and the presentation can be controlled in detail. The data is initialized by the component “Search form”, which is placed on any page on the web site.

Load User Info cookies

This component loads a non-persistent cookie collection with data for the current user. It is typically placed on the start page of an application to give Content Studio access to information about an authenticated user. The data is stored in the cookie collection “CS_UserData” with the sub-cookies FullName, UserName, Domain, Email, SID, UserID, UserKey, LoginDate, PreviousLogin and Trustee. The data is easily retrieved using the “SiteBase.GetCookie” method for example:

C#
 string MyDomainCookie = Page.GetCookie("CS_UserData", "Domain");
VB.NET
 Dim MyDomainCookie As String = Page.GetCookie("CS_UserData", "Domain")

Att arbeta med AS-komponenter

Om en förändring sker i AS-komponenter som redan infogats på sidor, kommer förändringen inte automatiskt att slå igenom på de infogade sidorna. För att uppdatera programkoden för AS-komponenterna på de berörda sidorna behöver funkionen Synkronisera Dokument köras på dokumentet eller i den kategori där dokumenten/sidorna lagras.

Om nya parametrar läggs till i AS-komponenter som redan infogats på sidor, och sidorna synkroniseras med funktionen Synkronisera Dokument, kommer de nya paramentrarnas standardvärden att användas. Om användaren vill ändra inställningar i de nya parametrarna behöver användaren först välja Uppdatera AS-komponenter från verktygsmenyn i Webbitorn. Denna funktion adderar de nya parametrarna i XML-öarna där inställningarna för AS-komponenterna lagras.

När en AS-komponent infogas på en sida visas det gränssnitt som definierats för komponenten (se Parametrar nedan). I vissa fall är de önskvärt att ett variabelt värde till en parameter - ett värde som styrs av en variabel. I dessa fall skall kryssrutan Variabelnamn kryssas i och i värdefältet anges namnet på variabeln.